\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q: How do I cause mail to be automatically forwarded to destinations outside our local network through some outside service?\
\
A: You'll need to make some minor changes to your mailhost's
\b sendmail.cf
\b0 file. The sendmail configuration file,
\b /etc/sendmail/sendmail.cf
\b0 is either a link to
\b sendmail.mailhost.cf
\b0 or is some variant of the mailhost configuration. You edit this file on your mailhost—the machine which is responsible for forwarding mail.\
\
Look for the following lines near the top of the file (in the default
\b sendmail.mailhost.cf
\b0 , they start at line 30):\
\
\pard\tx1240\tx2480\tx3740\tx4980\tx6240\tx7480\tx8720\tx9980\tx11220\tx12480\f1\fs20\fi720\fc1\cf1 # If you want to use a relay mailer, examine ruleset 0. There are some\
# rules that need to be uncommented\
DMuucp\
\
# major relay host: use the $M mailer to send mail to other domains\
# To have mail automatically forwarded to other domains, you should\
# replace this with the name of your major relay host.\
tells sendmail that mail destined for a machine off the local network should be forwarded using the “uucp” mailer — i.e., using the UNIX UUCP facility. The lines \
\
\pard\tx1240\tx2480\tx3740\tx4980\tx6240\tx7480\tx8720\tx9980\tx11220\tx12480\f1\fs20\fi720\fc1\cf1 DR mail-relay\
\b0 is the forwarding host. Change these three lines to reflect your actual situation. Typically,
\b uucp
\b0 is the appropriate mailer if you're not on the Internet. Either replace
\b mail-relay
\b0 with the name of your UUCP partner, or ensure that
\b mail-relay
\b0 is a host alias of that partner. (Note that if you make
\b mail-relay
\b0 be an alias for that partner and you're using UUCP as the relay mail mechanism, you have to modify the UUCP configuration files to reflect this alias.)\
\
If you look at the comments which begin the excerpt included above, you see a note regarding uncommenting some lines in “ruleset 0.” Look for the following lines in
\b sendmail.cf
\b0 (at line 323 in the default
\b sendmail.mailhost.cf
\b0 ):\
\
\pard\tx1240\tx3180\tx4980\tx7680\tx8720\tx9980\tx11220\tx12480\f1\fs20\fi720\fc1\cf1 # If you want to pass all other explicit domain names up the ladder\
# to our forwarder then uncomment the following line.\
These lines describe how to forward non-local mail. In the default file for a mailhost, such mail is forwarded using the
\b ddn
\b0 mailer (i.e., over the Internet). We want to change that, to use the mail specified above, in the
\b DM
\b0 line. To do this, uncomment the third line and comment out the fifth line:\
\
\pard\tx1240\tx3180\tx4980\tx7680\tx8720\tx9980\tx11220\tx12480\f1\fs20\fi720\fc1\cf1 # If you want to pass all other explicit domain names up the ladder\
# to our forwarder then uncomment the following line.\
\i0 careful when you modify a sendmail configuration file. As you might notice, the syntax is arcane and cryptic, and the “rewriting rules” in the configuration file are intricate.\